home *** CD-ROM | disk | FTP | other *** search
/ Amiga News 95 / Amiga News 95.iso / dpat / dpat19 / uik_distributionlibre / presentation < prev    next >
Encoding:
Text File  |  1992-11-22  |  10.8 KB  |  310 lines

  1.                  Example code at the end.
  2.  
  3.  
  4. ---------------------------------ENGLISH------------------------------
  5.  
  6.     Offers already done objects for construction of professional
  7.     quality user interfaces, using ARexx, images, sounds, musics,
  8.     etc...
  9.     The default visual aspect is the "3D look".
  10.  
  11.     Adjust itself with the user choices: font, colors, selection
  12.     modes, display modes, user language, etc...
  13.  
  14.     Assures an identical aspect and the compatibility with the
  15.     system versions 1.x, 2.x and 3.0.
  16.  
  17.     Only a small knowledge of the system is necessary to build
  18.     sophisticated applications and user interfaces.
  19.  
  20.     Can be used with any compiler able to give the address of
  21.     sub-programs, to allow UIK to call them (C, assembler,
  22.     Pascal, etc...).
  23.  
  24.     Makes accessible easily object oriented programming with any
  25.     of these compilers. This allows a programmation of the type
  26.     "construction game", fast and motivating.
  27.  
  28.     Execution speed: UIK is developed in assembler and C.
  29.  
  30.     Event driven programming: UIK takes charge of the wait loop for
  31.     events managing. Applications are always ready to answer to an
  32.     event from the user or a program, and the programmer assigns
  33.     functions to objects DYNAMICALY (while program execution) and
  34.     relative to specific events.
  35.  
  36.     Transparent management of objects thanks to same basic functions,
  37.     automatic inheritance as cascade between objects for some of
  38.     their characteristics.
  39.  
  40.     An application under UIK takes in account 2 languages under
  41.     1.3 and 2.04, and as many as possible with system versions 2.1
  42.     and 3.0, thanks to automatic use of "locale.library" and external
  43.     catalogs.
  44.  
  45.     UIK is not a code generator (builder). It is the opposite and a
  46.     lot more than that.
  47.     We program as usual with our text editor, we call functions of
  48.     "uik.library".
  49.  
  50.     It is the opposite because it brings to us what the generators
  51.     do not: what is explained above and more.
  52.  
  53.     It is a lot more than a generator because the power of the
  54.     object engine and all the things which it brings in automatic,
  55.     save a lot of development time, so much that the saved time with
  56.     a generator becomes negligible.
  57.  
  58.     For questions, bug reports, enhancements, see the author:
  59.  
  60.                 Jean-Michel Forgeas
  61.                 16170 Bordeville
  62.                 France
  63.  
  64.                 uucp: {uunet}!cbmvax!cbmehq!cbmfra!swinjm!forgeas
  65.                   or: forgeas@swinjm.adsp.sub.org
  66.  
  67.     Sale :
  68.  
  69.     The package is made of a 88 pages plastic wrapped manual and two
  70.     disks into sealed envelope. One disk is the UIK develpment kit
  71.     and the other one contains the 2.0 system include files and the
  72.     Commodore development kit, distributed under a Commodore license.
  73.  
  74.     Public price: $130 US
  75.     Direct Sale: send your command + check to the order address above.
  76.     Retailers: consult me.
  77.  
  78.  
  79. -------------------------------FRANCAIS---------------------------------
  80.  
  81.     Offre des objets tous faits pour la construction d'interfaces
  82.     utilisateur de qualité professionnelle, utilisant ARexx, images,
  83.     sons, musiques, etc...
  84.     L'aspect visuel par défaut est le "look 3D".
  85.  
  86.     S'ajuste automatiquement sur les choix de l'utilisateur : police
  87.     de caractères, couleurs, modes de sélection, modes d'écran, langue
  88.     de l'utilisateur, etc...
  89.  
  90.     Assure un aspect identique ainsi que la compatibilité avec les
  91.     versions 1.x, 2.x, 3.0 du système d'exploitation.
  92.  
  93.     Seule une connaissance très sommaire du système est requise pour
  94.     pouvoir faire des applications et des interfaces utilisateur
  95.     sophistiquées.
  96.  
  97.     Utilisable avec n'importe quel compilateur qui permet de donner
  98.     l'adresse de sous-programmes afin que UIK puisse les appeler (C,
  99.     assembleur, Pascal, etc...).
  100.  
  101.     Rend accessible facilement la programmation orientée objets avec
  102.     n'importe lequel de ces compilateurs. Cela permet une programmation
  103.     du type "jeu de construction" rapide et motivante.
  104.  
  105.     Rapidité d'exécution : UIK est développé en assembleur et en
  106.     langage C.
  107.  
  108.     Programmation par évènements : UIK prend en charge la boucle
  109.     d'attente et de gestion des évènements. Les applications sont toujours
  110.     prêtes à répondre à un évènement utilisateur ou programme, et le
  111.     programmeur assigne des fonctions aux objets DYNAMIQUEMENT (pendant
  112.     l'exécution du programme) et relatives à des évènements spécifiques.
  113.  
  114.     Gestion transparente des objets grâce aux mêmes fonctions de
  115.     base, héritage en cascade automatique entre objets pour certaines
  116.     de leurs caractéristiques.
  117.  
  118.     Une application sous UIK prend en compte 2 langages sous 1.3 et
  119.     2.04, et autant de langages qu'il est possible avec les versions
  120.     2.1 et 3.0 du système, grâce à l'utilisation automatique de
  121.     "locale.library" et de catalogues externes.
  122.  
  123.     UIK n'est pas un générateur de code, il est à la fois le contraire
  124.     et bien plus que cela.
  125.     On programme comme d'habitude avec son éditeur de texte, on appelle
  126.     les fonctions de "uik.library".
  127.  
  128.     Il est le contraire car il apporte ce que les générateurs de code
  129.     laissent de côté : ce qui est expliqué ci-dessus et bien plus.
  130.  
  131.     Il est bien plus qu'un générateur car la puissance du moteur objet
  132.     et toutes les choses qu'il rend automatiques font gagner un temps
  133.     énorme sur le développement, tellement que le temps économisé avec
  134.     un générateur de code (ou builder) devient négligeable.
  135.  
  136.     Pour des questions, bug reports, idées, s'adresser à l'auteur :
  137.  
  138.                 Jean-Michel Forgeas
  139.                 16170 Bordeville
  140.                 France
  141.  
  142.                 uucp: {uunet}!cbmvax!cbmehq!cbmfra!swinjm!forgeas
  143.                   ou: forgeas@swinjm.adsp.sub.org
  144.  
  145.     Vente :
  146.  
  147.     Le package comprend un manuel de 88 pages sous plastique et deux
  148.     disquettes sous enveloppe scellée. Une disquette contenant le kit
  149.     de développement UIK et l'autre les fichiers includes Système 2.0
  150.     et le kit de développement Commodore, distribuée sous licence
  151.     Commodore.
  152.     Le prix public est de 550 Francs français TTC.
  153.     Vente directe : adressez vos commande + chèque à l'adresse ci-dessus.
  154.     Revendeurs : me consulter.
  155.  
  156.  
  157. ---------------------- Simple working example code ---------------------
  158.  
  159. /****************************************************************
  160.  *
  161.  *      File:      ListProp
  162.  *      Project:   UIK example code
  163.  *
  164.  *      Created:   23-08-92     Jean-Michel Forgeas
  165.  *
  166.  ****************************************************************/
  167.  
  168.  
  169. /****** Includes ************************************************/
  170.  
  171. #include <libraries/dos.h>
  172.  
  173. #include "uiki:uikbase.h"
  174. #include "uiki:uikobj.h"
  175. #include "uiki:uikmacros.h"
  176. #include "uiki:uikglobal.h"
  177. #include "uiki:uik_protos.h"
  178. #include "uiki:uik_pragmas.h"
  179. #include "uiki:objlist.h"
  180. #include "uiki:objproplift.h"
  181. #include "uiki:objwindow.h"
  182.  
  183. #define TEXT_WindowTitle    1
  184. #define TEXT_ScreenTitle    2
  185. #define TEXT_ListTitle      3
  186. #define TEXT_ListEntry      4
  187.  
  188.  
  189. /****** Statics ************************************************/
  190.  
  191. static struct UIKBase *UIKBase;
  192. static struct UIKGlobal *UIK;
  193.  
  194. static struct UIKObj *Up;
  195. static struct UIKObj *Down;
  196. static struct UIKObj *List;
  197.  
  198. static UBYTE *LangEnglish[] =
  199.     {
  200.     "",
  201.     "ListProp",
  202.     "ListProp Copyright © 1992 Jean-Michel Forgeas",
  203.     "The List",
  204.     "Hello1\nHello2\nHello3\nHello4\nHello5\nHello6\nHello7\nHello8\nHello9\nHello10\nHello11\nHello12",
  205.     0
  206.     };
  207.  
  208. static UBYTE *LangOther[] =
  209.     {
  210.     "",
  211.     "ListProp",
  212.     "ListProp Copyright © 1992 Jean-Michel Forgeas",
  213.     "La liste",
  214.     "bonjour1\n"
  215.         "bonjour2\n"
  216.         "bonjour3\n"
  217.         "bonjour4\n"
  218.         "bonjour5",
  219.     0
  220.     };
  221.  
  222. static UWORD PatProp[] = { 0xAAAA, 0x5555 };
  223.  
  224.  
  225. /****************************************************************
  226.  *
  227.  *      Code
  228.  *
  229.  ****************************************************************/
  230.  
  231. static void Cleanup()
  232. {
  233.     if (UIK)     UIK_Remove( UIK );
  234.     if (UIKBase) CloseLibrary( UIKBase );
  235.     exit(0);
  236. }
  237.  
  238. void main()
  239. {
  240.   struct UIKObj *wo;
  241.   struct UIKObj *oprop;
  242.  
  243.     if (! (UIKBase = (struct UIKBase *) OpenLibrary( UIKNAME, 0 ))) goto END_ERROR;
  244.     if (! (UIK = (struct UIKGlobal *) UIK_AddObjectTags( "UIK", 0,
  245.              UIKTAG_GEN_LangEnglish,    (ULONG) LangEnglish,
  246.              UIKTAG_GEN_LangOther,      (ULONG) LangOther,
  247.              UIKTAG_GEN_Catalog,        (ULONG) "uik/test/ListProp.catalog",
  248.              TAG_END ))) goto END_ERROR;
  249.  
  250.     if (! (wo = UIK_AddObjectTags( "UIKObj_Window", UIK, /* Window */
  251.             UIKTAG_OBJ_LeftTop,       W2L(180,30),
  252.             UIKTAG_OBJ_WidthHeight,   W2L(250,104),
  253.             UIKTAG_OBJ_Title,         TEXT_WindowTitle,
  254.             UIKTAG_OBJ_AltTitle,      TEXT_ScreenTitle,
  255.             TAG_END ))) goto END_ERROR;
  256.  
  257.     if (! (List = UIK_AddObjectTags( "UIKObj_List", wo,  /* List */
  258.             UIKTAG_OBJ_LeftTop,       W2L(10,15),
  259.             UIKTAG_OBJ_WidthHeight,   W2L(200,70),
  260.             UIKTAG_OBJ_Title,         TEXT_ListTitle,
  261.             UIKTAG_OBJ_TitleFl_Above, TRUE,
  262.             UIKTAG_OBJListFl_ClickSel,FALSE,
  263.             UIKTAG_OBJListFl_SelDispl,FALSE,
  264.             UIKTAG_OBJList_TextPtr,   (ULONG) UIK_LangString( UIK, TEXT_ListEntry ),
  265.             UIKTAG_OBJ_Sz_AttachedFl_Top,   TRUE,
  266.             UIKTAG_OBJ_Sz_AttachedFl_Left,  TRUE,
  267.             UIKTAG_OBJ_Sz_AttachedFl_Right, TRUE,
  268.             UIKTAG_OBJ_Sz_AttachedFl_Bot,   TRUE,
  269.             TAG_END ))) goto END_ERROR;
  270.  
  271.     if (! (oprop = UIK_AddObjectTags( "UIKObj_PropLift", wo, /* Prop */
  272.             UIKTAG_OBJ_LeftTop,       W2L(215,15),
  273.             UIKTAG_OBJ_WidthHeight,   W2L(20,70),
  274.             UIKTAG_OBJ_BoxFl_Over,    FALSE,
  275.             UIKTAG_OBJ_Sz_AttachedFl_Top,  TRUE,
  276.             UIKTAG_OBJ_Sz_AttachedFl_Right,TRUE,
  277.             UIKTAG_OBJ_Sz_AttachedFl_Bot,  TRUE,
  278.             UIKTAG_OBJProp_Vertical,  TRUE,
  279.             UIKTAG_OBJ_Pattern,       (ULONG)PatProp,
  280.             UIKTAG_OBJ_PatternPower,  1,
  281.             TAG_END ))) goto END_ERROR;
  282.  
  283.     if (! (Up = UIK_AddObjectTags( "UIKObj_Up", wo,     /* Up */
  284.             UIKTAG_OBJ_LeftTop,       W2L(10,87),
  285.             UIKTAG_OBJ_WidthHeight,   W2L(100,12),
  286.             UIKTAG_OBJ_Sz_AttachedFl_Bot,  TRUE,
  287.             TAG_END ))) goto END_ERROR;
  288.     if (! (Down = UIK_AddObjectTags( "UIKObj_Down", wo, /* Down */
  289.             UIKTAG_OBJ_LeftTop,       W2L(110,87),
  290.             UIKTAG_OBJ_WidthHeight,   W2L(100,12),
  291.             UIKTAG_OBJ_Sz_AttachedFl_Bot,  TRUE,
  292.             TAG_END ))) goto END_ERROR;
  293.  
  294.     /* Link the prop to the list */
  295.     if (! UIK_Link( oprop, List, 0, MOUSEMOVE|GADGETDOWN, 0 )) goto END_ERROR;
  296.  
  297.     /* Link buttons Up and Down to the prop */
  298.     if (! UIK_Link( Up, oprop, 0, GADGETDOWN|INTUITICKS|MOUSEMOVE, 0 )) goto END_ERROR;
  299.     if (! UIK_Link( Down, oprop, 0, GADGETDOWN|INTUITICKS|MOUSEMOVE, 0 )) goto END_ERROR;
  300.  
  301.     /* Opens window and gadgets */
  302.     if (! UIK_Start( UIK )) goto END_ERROR;
  303.  
  304.     /* Let UIK manage the events */
  305.     UIK_Do( UIK, SIGBREAKF_CTRL_C );
  306.  
  307.   END_ERROR:
  308.     Cleanup();
  309. }
  310.